require(["common", "jQuery", "coAjax", "queryString", "href", "hash_routie"], function(jSouper, $, coAjax, QueryString, href, hash_routie) {
	hash_routie.on("express", function() {
		App.set('title', '物流查询');
		var queryString = new QueryString(location.hash);
		var _id = queryString.get("id");
		var num = queryString.get('num');
		var com = queryString.get('com');
		// 商品详情
		App.set('order', _id);
		App.set('num', num);
		App.set('com', com);
		if (num) {
			coAjax.get(appConfig.server_url + "express_search", {
				num: num,
				company: com
			}, function(result) {
				console.log(result.result);
				App.set("express_data", result.result);
			});
		}
		App.set('$Cache.get_com', '申通');
		App.set('$Event.get_com', function() {
			App.set('$Cache.get_com', this.value);
		});
		App.set('$Event.sendExp', function() {
			coAjax.put(appConfig.bus["achs_未发货_to_已发货"] + _id, {
				express_info: {
					company: App.get('$Cache.get_com'),
					num: App.get('info.express_info.num')
				}
			}, function(result) {
				alert("物流设置成功，订单已设置为发货状态");
				App.set("info.state", result.result);
				href.jump("#default/order");
			});
		})
	})
})